package com.nnnu.wsnackshop.pojo.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 商品SKU VO
 */
@Data
@Schema(description = "商品SKU信息")
public class SkuVO {
    /**
     * SKU ID
     */
    @Schema(description = "商品SKU ID")
    private Long id;
    @Schema(description = "商品SPU ID")
    private Integer spuId;
    @Schema(description = "商品ID，关联 products.id")
    private Integer productId;
    @Schema(description = "商品SPU标题")
    private String spuTitle; // 额外
    @Schema(description = "SKU标题")
    private String title;
    @Schema(description = "SKU图片")
    private List<String> images; // JSON 反序列化
    @Schema(description = "SKU价格")
    private BigDecimal price;
    @Schema(description = "SKU成本价")
    private BigDecimal costPrice;
    @Schema(description = "SKU规格组合")
    private String specCombination;
    @Schema(description = "库存")
    private Integer stock;
    @Schema(description = "上架状态，0：下架，1：上架")
    private Boolean saleable;
    @Schema(description = "是否有效，0：无效，1：有效")
    private Boolean valid;
    @Schema(description = "SKU编码")
    private String skuCode;
    @Schema(description = "创建时间")
    private LocalDateTime createTime;
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;
    @Schema(description = "规格JSON")
    private String specs;
}
